﻿<%@ include file="../finance/common_page_top.jsp" %>
<%@ page import="java.text.SimpleDateFormat"%>
<%@ page import="java.util.Date"%>
<ul class="nav nav-tabs" id="myTab">
	<li class="active"><a href="#basis-one-step">初步对账</a></li>
	<li><a href="#basis-second-step">生成对账单</a></li>
	<li><a href="#basis-third-step">复核对账</a></li>
</ul>

<div id="basis-one-step" class="tab">
	<div class="main-content-inner">
		<%--<h4>成本对账-初步对账</h4>--%>
		<div class="position-relative">
			<table style="width:100%;">
				<tr>
					<td style="vertical-align:top;">
						<a title="查询" class="btn btn-mini btn-danger js_btn_left_search-one">
							<i class='ace-icon fa bigger-120'>查询</i>
						</a>
						<a title="" class="btn btn-mini btn-info">
							<i class="ace-icon fa bigger-120 js_btn_gen-one">对账</i>
						</a>
						<%--<a title="" class="btn btn-mini btn-danger js_btnExportCommon"
                           exportType="checkIncomeList" exportTarget="form_checkList">
                            <i class='ace-icon fa bigger-120'>导出账单</i>
                        </a>--%>
					</td>
				</tr>
			</table>
		</div>
		<form id="qry-undo-form-one">
			<div class="div-left-search-one">
				<tr>
					<td><input type="hidden" name="page.currentPage" value="1" />
						<input type="hidden" name="page.showCount" value="10"/>
						<input type="hidden" name="status" value="0" />
						<input type="hidden" name="formIndex" value="0" />
					</td>
					<td>托单号<input type="text" name="tdh" maxlength="200" />
					<td>提单号<input type="text" name="tdh1" maxlength="200" />
					<td> <button type="button"
								 class="btn btn-success js_left_query-one">查询</button></td>
				</tr>
			</div>
		</form>
		<div class="table-layout">
			<table id="simple-table-one" class="table table-striped table-bordered table-hover table-content">
				<thead>
				<tr>
					<th class="center" style="width:35px;">
						<label class="pos-rel">
							<input type="checkbox" class="ace js_selectAll"/>
							<span class="lbl"></span></label>
					</th>
					<%--<th class="center">序号</th>
					<th class="center">开票状态</th>--%>
					<th class="center">托单号</th>
<!-- 					<th class="center">出提单号</th> -->
					<th class="center">提单号</th>
					<th class="center">提单类型</th>
					<th class="center">订舱单位</th>
					<th class="center">结算单位</th>
					<th class="center">费用名称</th>
					<th class="center">对账单号</th>
					<th class="center">对账人</th>
					<th class="center">对账日期</th>
					<th class="center">箱型</th>
					<th class="center">单价</th>
					<th class="center">箱量</th>
					<th class="center">报几出几</th>
					<th class="center">总金额</th>
					<th class="center">币种</th>
					<th class="center">汇率</th>
					<th class="center">海船名</th>
					<th class="center">海船航次</th>
					<th class="center">海船实际开航时间</th>
					<th class="center">江船名</th>
					<th class="center">江船航次</th>
					<th class="center">江船开航日期</th>
					<th class="center">客服</th>
					<th class="center">销售</th>
					<th class="center">录入人</th>
					<th class="center">录入日期</th>
					<th class="center">备注</th>
				</tr>
				</thead>
				<tbody>

				</tbody>
			</table>
		</div>
	</div>
	<div class="main-content-inner">
		<div class="row">
			<%--<h4>对账明细</h4>--%>
			<div class="position-relative" style="width:100%">
				<table style="width:100%;">
					<tr>
						<td style="vertical-align:top;">
							<a title="查询" class="btn btn-mini btn-danger js_btn_qry_check_detail-one">
								<i class='ace-icon fa bigger-120'>查询</i>
							</a>
							<a title="" class="btn btn-mini btn-warning js_btn_invalid_items-one">
								<i class="ace-icon fa bigger-120">撤销对账</i>
							</a>
						</td>
					</tr>
				</table>
			</div>
			<form id="qry-done-form-one">
				<input type="hidden" name="page.currentPage" value="1" />
				<input type="hidden" name="page.showCount" value="10"/>
				<input type="hidden" name="status" value="2" />
				<input type="hidden" name="formIndex" value="1" />
			</form>
			<div class="table-layout">
				<table id="check-cost-detail-one"
					   class="table table-striped table-bordered table-hover"
					   style="margin-top:5px;">
					<thead>
					<tr>
						<td class='center' style="width: 30px;">
							<label><input type='checkbox' name='ids' class="ace js_selectAll"/><span
									class="lbl"></span></label>
						</td>
						<%--<th class="center" style="width:50px;">编号</th>--%>
						<th class="center">托单号</th>
						<th class="center">提单号</th>
						<th class="center">贸易类型</th>
						<th class="center">结算单位</th>
						<th class="center">费用名称</th>
						<th class="center">箱型</th>
						<th class="center">箱主</th>
						<th class="center">单价</th>
						<th class="center">箱量</th>
						<th class="center">总金额</th>
						<th class="center">汇率</th>
						<th class="center">币种</th>
						<th class="center">业务员</th>
						<th class="center">对账人</th>
						<th class="center">录入日期</th>
						<th class="center">备注</th>
					</tr>
					</thead>
					<tbody>

					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
<div id="basis-second-step" style="display: none" class="tab">
<!--成本对账-初步对账 -->
	<div class="main-content-inner">
		<h4>成本对账-生成对账</h4>
		<div class="position-relative">
			<table style="width:100%;">
				<tr>
					<td style="vertical-align:top;">
						<a title="查询" class="btn btn-mini btn-danger js_btn_left_search">
							<i class='ace-icon fa bigger-120'>查询</i>
						</a>
						<a title="" class="btn btn-mini btn-info">
							<i class="ace-icon fa bigger-120 js_btn_gen">生成对账单</i>
						</a>
						<a>
<!-- 						   <tr> -->
						      <td style="width:100px">要求付款时间</td>
						      <td style="vertical-align:right;width:100px"><input id="requirePayTime" name="requirePayTime" type="text" style="width:100%;height:100%"  onClick="WdatePicker({dateFmt:'yyyy-MM-dd'});" 
						      value="<%=new SimpleDateFormat("yyyy-MM-dd").format(new Date())%>"/></td>
						   
<!-- 						   </tr> -->
							
						</a>
						
						<%--<a title="" class="btn btn-mini btn-danger js_btnExportCommon"
						   exportType="checkIncomeList" exportTarget="form_checkList">
							<i class='ace-icon fa bigger-120'>导出账单</i>
						</a>--%>
					</td>
				</tr>
			</table>
		</div>
		<form id="qry-undo-form">
			<div class="div-left-search">
				<tr>
					<td><input type="hidden" name="page.currentPage" value="1" />
						<input type="hidden" name="page.showCount" value="10"/>
						<input type="hidden" name="status" value="2" />
						<input type="hidden" name="formIndex" value="2" />
					</td>
					<td>托单号<input type="text" name="tdh" id="tdh" maxlength="200" />
					<td>提单号<input type="text" name="tdh1" id="tdh1" maxlength="200" />
					<td> <button type="button"
								 class="btn btn-success js_left_query">查询</button></td>
				</tr>
			</div>
		</form>
		<div class="table-layout">
			<table id="simple-table" class="table table-striped table-bordered table-hover table-content">
				<thead>
				<tr>
					<th class="center" style="width:35px;">
						<label class="pos-rel">
							<input type="checkbox" class="ace js_selectAll" id="zcheckbox"/>
							<span class="lbl"></span></label>
					</th>
					<%--<th class="center">序号</th>
					<th class="center">开票状态</th>--%>
					<th class="center">托单号</th>
					<!--  <th class="center">出提单号</th>-->
					<th class="center">提单号</th>
					<th class="center">提单类型</th>
					<th class="center">订舱单位</th>
					<th class="center">结算单位</th>
					<th class="center">费用名称</th>
					<th class="center">对账单号</th>
					<th class="center">对账人</th>
					<th class="center">对账日期</th>
					<th class="center">箱型</th>
					<th class="center">单价</th>
					<th class="center">箱量</th>
					<th class="center">报几出几</th>
					<th class="center">总金额</th>
					<th class="center">币种</th>
					<th class="center">汇率</th>
					<th class="center">海船名</th>
					<th class="center">海船航次</th>
					<th class="center">海船实际开航时间</th>
					<th class="center">江船名</th>
					<th class="center">江船航次</th>
					<th class="center">江船开航日期</th>
					<th class="center">客服</th>
					<th class="center">销售</th>
					<th class="center">录入人</th>
					<th class="center">录入日期</th>
					<th class="center">备注</th>
				</tr>
				</thead>
				<tbody>

				</tbody>
			</table>
		</div>
	</div>
	<div class="main-content-inner">
		<div class="row">
			<h4>对帐记录</h4>
			<div class="position-relative">
				<table style="width:100%;">
					<tr>
						<td style="vertical-align:top;">
							<a title="查询" class="btn btn-mini btn-danger js_btn_qry_check">
								<i class='ace-icon fa bigger-120'>查询</i>
							</a>
							<a title="" class="btn btn-mini btn-warning js_receipt_input">
								<i class="ace-icon fa bigger-120">发票录入</i>
							</a>
							<a title="" class="btn btn-mini btn-danger js_btn_cancel_check">
								<i class='ace-icon fa bigger-120'>撤销</i>
							</a>
							<a title="" class="btn btn-mini btn-danger js_btn_pay_request">
								<i class='ace-icon fa bigger-120'>付款申请</i>
							</a>
							<a title="" class="btn btn-mini btn-warning exportType"					>							
								<i class='ace-icon fa bigger-120'>成本付款单导出</i>
							</a>
							<a title="" class="btn btn-mini btn-danger js_btnExportCommon"
							   exportType="checkCostList" exportTarget="form_checkList">
								<i class='ace-icon fa bigger-120'>导出明细</i>
							</a>
						</td>
					</tr>
				</table>
			</div>
			<form id="form_checkList">
				<input type="hidden" name="page.currentPage" value="1" />
				<input type="hidden" name="page.showCount"  value="10"/>
				<input type="hidden" name="formIndex" value="3" />
			</form>
			<div class="table-layout">
				<table id="simple-table-cost"
					   class="table table-striped table-bordered table-hover">
					<thead>
						<tr>
						<th class="center" style="width:35px;">
							<label class="pos-rel">
								<input type="checkbox" class="ace js_selectAll" />
								<span class="lbl"></span>
							</label>
						</th>
						<%--<th class="center">序号</th>--%>
						<th class="center">对账单号</th>
						<th class="center">发票单位</th>
						<th class="center">对账金额</th>
						<th class="center">发票金额</th>
						<th class="center">币种</th>
						<th class="center">汇率</th>
						<th class="center">预约日期</th>
						<th class="center">要求付款时间</th>
						<th class="center">操作人</th>
						<th class="center">审核状态</th>
						<th class="center">备注</th>
					</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
			</div>
		</div>
		<div class="row">
		<h4>对账记录明细</h4>
		<div class="position-relative" style="width:100%">
			<table style="width:100%;">
				<tr>
					<td style="vertical-align:top;">
						<a title="查询" class="btn btn-mini btn-danger js_btn_qry_check_detail">
							<i class='ace-icon fa bigger-120'>查询</i>
						</a>
						<a title="" class="btn btn-mini btn-warning js_btn_invalid_items">
							<i class="ace-icon fa bigger-120">撤销对账</i>
						</a>
					</td>
				</tr>
			</table>
		</div>
		<input type="hidden" name="formIndex" value="4" />
		<div class="table-layout">
			<table id="check-cost-detail"
				   class="table table-striped table-bordered table-hover"
				   style="margin-top:5px;">
				<thead>
				<tr>
					<td class='center' style="width: 30px;">
						<label><input type='checkbox' name='ids' class="ace js_selectAll"/><span
								class="lbl"></span></label>
					</td>
					<%--<th class="center" style="width:50px;">编号</th>--%>
					<th class="center">托单号</th>
					<th class="center">提单号</th>
					<th class="center">贸易类型</th>
					<th class="center">结算单位</th>
					<th class="center">费用名称</th>
					<th class="center">箱型</th>
					<th class="center">箱主</th>
					<th class="center">单价</th>
					<th class="center">箱量</th>
					<th class="center">总金额</th>
					<th class="center">汇率</th>
					<th class="center">币种</th>
					<th class="center">业务员</th>
					<th class="center">录入人</th>
					<th class="center">录入日期</th>
					<th class="center">备注</th>
				</tr>
				</thead>
				<tbody>

				</tbody>
			</table>
		</div>
	</div>
	</div>
</div>

<div id="basis-third-step" style="display: none" class="tab">
	<form action="${ctx}/costAcct/indexReview" target="tab3Page" id="tab3Form">
           <td><input type="hidden" name="page.currentPage" value="1" />
						<input type="hidden" name="page.showCount" value="10"/>
						<input type="hidden" name="status" value="2" />
						<input type="hidden" name="formIndex" value="2" />
		</td>
	</form>
	<iframe id="tab3Page" name="tab3Page"  style="margin:0 auto;width:100%;height:100%;min-height:768px;" frameborder="0">

	</iframe>
</div>

	<script type="text/javascript"
		src="<%=path%>/static/js/settlement/check_cost_index-one.js?${staticFileVer}"></script>

	<script type="text/javascript"
			src="<%=path%>/static/js/settlement/check_cost_index.js?${staticFileVer}"></script>

<%@ include file="../finance/common_page_bottom.jsp" %>

<style>
	.table-layout{
		min-height:200px!important;
		/*bottom: 10px;
		top:10px;*/
	}
	.active{
		background-color:yellow;
	}
</style>
<script type="text/javascript">
     
	$('#myTab a').click(function (e) {
		e.preventDefault();
		$(".tab").css("display","none");
		$("#myTab li").removeClass("active");
		//$($(e.target).parent().sibling()).removeClass("active");
		$($(e.target).parent()).addClass("active");
		$($(e.target).attr("href")).css("display","block");
	});
	$(function () {
		$('#myTab a:first').tab('show');

		$('#myTab a:last').click(function () {
			$("#tab3Form").submit();
		});
		$($("#myTab a")[1]).click(function () {
			$(".js_left_query").click();
			$(".js_btn_qry_check").trigger("click");
		});
	});
	//成本付款单导出
	$(".exportType").click(function () {
        var checkId= "";
        var t = $("#simple-table-cost").find("input[name='ids']:checked");
        if (!t || t.length>1){
            return;
        }
        t = $(t).first();
       checkId = t.val();
        //alert(checkId)
        if (!checkId ||checkId.length<1){
            alert("请选择一条记录");
            return;
        }
      document.location.href="../common/export/exportExcel?exportType="+"CostBill"+"&Exportcostbill="+checkId;
    });
</script>
</body>
</html>